import request from "@/utils/request";


export function page(good,page,pageSize) {
  return request({
    url: '/admin/getGood?'+'page='+page+'&pageSize='+pageSize,
    method: 'post',
    data:good
  })
}
export function changeGood(good) {
  return request({
    url: '/admin/changeGood',
    method: 'post',
    data:good
  })
}

export function deleteGood(id) {
  return request({
    url: '/admin/deleteGood?id='+id,
    method: 'delete'
  })
}

export function addGood(good) {
  return request({
    url: '/admin/addGood',
    method: 'post',
    data:good
  })
}

export function buy(good,total) {
  return request({
    url: '/admin/good/buy?total='+total,
    method: 'post',
    data:good
  })
}




